import Vue from "vue";

export default {
  loadLoginedStaff(callback) {
    Vue.http.get('/logined_user.json').then(function (response) {
      callback(response.data);
    });
  },
  //系统权限
  loadRoleServer(callback) {
    Vue.http.get('/role/company/list.json', {
      params: {fields: 'id,name'}
    }).then(function (response) {
      callback(response.data);
    });
  },
  //修改密码
  modifyPassword(params,callback_success,callback_error) {
    Vue.http.put('/user/modify/pwd.json', params).then(response => {
      callback_success(response.data);
    }, response => {
      callback_error(response.data);
    });
  }
}
